from employee.models import Employee

def find_employee (employee_id):
    employees = Employee.objects.get(id=employee_id)
    return employees
    
def insert_employee(access_role, first_name,last_name ,email ,hired_date ,username,password ,password_salt):
    employee = Employee(access_role=access_role, first_name=first_name,last_name=last_name,
                        email=email ,hired_date=hired_date ,username=username,password=password,
                        password_salt=password_salt)
    return employee.save()

def update_employee(employee_id, **fields):
    return Employee.objects.filter(id=employee_id).update(**fields)

def delete_appointment(employee_id):
    employee = Employee.objects.get(id=employee_id)
    return employee.delete()
    
    
    